home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-20 | 4.1 KB | 139 lines | [TEXT/MPS ] |
- // Copyright © 1995 by Apple Computer, Inc. All rights reserved.
- // PCISlotsNameRegistry.cp
-
- /*
- FILE
- PCISlotsNameRegistry.cp
-
- NAME
- PCI Slot Peek source file
-
- DESCRIPTION
- This source file implements the native PPC code NameRegistry functions used by the
- PCI Slot Peek application. It provides the 68K->PPC glue code to the NameRegistry library.
-
- MODIFICATION HISTORY
- Created by Terry Teague
-
- 20 Apr 95 - TRT - Initial version
- 17 Jul 95 - TRT - Tidy-up source for PPCC v1.0.5, Universal Headers v2.0 final,
- CodeWarrior 6.1.
-
- =============================================================================================
- */
-
- //================================================================================================
- // Build-time #defines
- //================================================================================================
-
- // pre-Universal Headers (<MPW 3.3.1) compatibility
- #ifndef qPreUniHeaders
- #define qPreUniHeaders 0
- #endif
-
- //================================================================================================
- // Standard Includes
- //================================================================================================
-
- #include <Types.h>
- #include <Packages.h>
- #include <Dialogs.h>
- #include <Memory.h>
- //#if qPreUniHeaders
- //#include <OSEvents.h>
- //#endif
- #include <QuickDraw.h>
- #include <Resources.h>
- #include <ToolUtils.h>
- #include <StdIO.h>
- #include <Slots.h>
- #include <ROMDefs.h>
- #include <Devices.h>
- #include <Traps.h>
- #include <String.h>
- #include <Strings.h>
- #include <CType.h>
- #if qPreUniHeaders
- #include <SysEqu.h>
- #else
- #include <LowMem.h>
- #endif
- #include <Power.h>
- #include <DeskBus.h>
-
- // v2.0 final or later
- #ifndef __CODEFRAGMENTS__
- #include <CodeFragments.h>
- #endif
-
- // v2.0a3 or earlier (also kept in v2.0 final for compatibility)
- //#ifndef __FRAGLOAD__
- //#include <FragLoad.h>
- //#endif
-
- #ifndef __MIXEDMODE__
- #include <MixedMode.h>
- #endif
-
- // v2.0a3 or earlier
- #ifdef __FRAGLOAD__
- typedef SInt32 OSStatus;
- #endif
-
- #ifndef __NAMEREGISTRY__
- #include <NameRegistry.h>
- #endif
-
- //================================================================================================
- // PCISlots Specific Includes
- //================================================================================================
-
- #ifndef __PCISLOTS__
- #include "PCISlots.h"
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if GENERATINGPOWERPC || defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
-
- #ifdef __CFM68K__
- #pragma lib_export on
- #endif
-
- // Routine descriptors will be imported into the 68K application with FindSymbol()
-
- RoutineDescriptor RegistryEntryIterateCreateRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIterateCreateProcInfo, RegistryEntryIterateCreate);
- RoutineDescriptor RegistryEntryIterateDisposeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIterateDisposeProcInfo, RegistryEntryIterateDispose);
- RoutineDescriptor RegistryEntryIterateRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIterateProcInfo, RegistryEntryIterate);
- RoutineDescriptor RegistryEntryIDDisposeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryIDDisposeProcInfo, RegistryEntryIDDispose);
- RoutineDescriptor RegistryPropertyGetSizeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryPropertyGetSizeProcInfo, RegistryPropertyGetSize);
- RoutineDescriptor RegistryPropertyGetRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryPropertyGetProcInfo, RegistryPropertyGet);
- RoutineDescriptor RegistryEntryToPathSizeRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryEntryToPathSizeProcInfo, RegistryEntryToPathSize);
- RoutineDescriptor RegistryCStrEntryToPathRD = BUILD_ROUTINE_DESCRIPTOR(uppRegistryCStrEntryToPathProcInfo, RegistryCStrEntryToPath);
-
- #if 0
- // This code sets up the routine descriptor for the native PPC NameRegistry code
- // that is used from a 68K application
-
- void InitNativeNameRegistry(void)
- {
- EnumerateNameRegistryUPP = NewRoutineDescriptor((ProcPtr)EnumerateNameRegistry, uppEnumerateNameRegistryProcInfo, GetCurrentISA());
- }
- #endif
-
- #ifdef __CFM68K__
- #pragma lib_export off
- #endif
-
- #if GENERATINGPOWERPC || defined(powerc) || defined (__powerc)
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-